//
//  GuestCommunityChangeCell.m
//  QRMaster
//
//  Created by myApple on 15/6/11.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import "GuestCommunityChangeCell.h"

@interface GuestCommunityChangeCell()
{
    UILabel * cellNameLabel;
}

@end
@implementation GuestCommunityChangeCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self prepareView];
    }
    return self;
}

-(void)prepareView
{
    float ScreenWidth = self.frame.size.width;
    float x = 15;
    float y = 0;
    float width = ScreenWidth;
    float height = 44;
    
    cellNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(x, y, width, height)];
    cellNameLabel.font = [UIFont systemFontOfSize:12.0];
    cellNameLabel.textColor = RGBA(0, 0, 0, 0.8);
//    cellNameLabel.textAlignment = NSTextAlignmentCenter;
    cellNameLabel.numberOfLines = 2;
    [self.contentView addSubview:cellNameLabel];
}


-(void)setCellName:(NSString *)cellName
{
    _cellName = cellName;
    cellNameLabel.text = cellName;
}

-(void)setSelectOrNot:(BOOL)selectOrNot
{
    _selectOrNot = selectOrNot;
    if (selectOrNot) {
        cellNameLabel.textColor = RGBA(125, 194, 52, 1);
    }
    else
    {
        cellNameLabel.textColor = RGBA(0, 0, 0, 0.8);
    }
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
